package com.loan.system.create.service.impl;

import java.util.List;
import com.loan.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.loan.system.create.mapper.AssistPdfBaseConfMapper;
import com.loan.system.create.domain.AssistPdfBaseConf;
import com.loan.system.create.service.IAssistPdfBaseConfService;

/**
 * PDF基本配置Service业务层处理
 * 
 * @author Sophia
 * @date 2024-07-04
 */
@Service
public class AssistPdfBaseConfServiceImpl implements IAssistPdfBaseConfService 
{
    @Autowired
    private AssistPdfBaseConfMapper assistPdfBaseConfMapper;

    /**
     * 查询PDF基本配置
     * 
     * @param id PDF基本配置主键
     * @return PDF基本配置
     */
    @Override
    public AssistPdfBaseConf selectAssistPdfBaseConfById(Long id)
    {
        return assistPdfBaseConfMapper.selectAssistPdfBaseConfById(id);
    }

    /**
     * 查询PDF基本配置列表
     * 
     * @param assistPdfBaseConf PDF基本配置
     * @return PDF基本配置
     */
    @Override
    public List<AssistPdfBaseConf> selectAssistPdfBaseConfList(AssistPdfBaseConf assistPdfBaseConf)
    {
        return assistPdfBaseConfMapper.selectAssistPdfBaseConfList(assistPdfBaseConf);
    }

    /**
     * 新增PDF基本配置
     * 
     * @param assistPdfBaseConf PDF基本配置
     * @return 结果
     */
    @Override
    public int insertAssistPdfBaseConf(AssistPdfBaseConf assistPdfBaseConf)
    {
        assistPdfBaseConf.setCreateTime(DateUtils.getNowDate());
        return assistPdfBaseConfMapper.insertAssistPdfBaseConf(assistPdfBaseConf);
    }

    /**
     * 修改PDF基本配置
     * 
     * @param assistPdfBaseConf PDF基本配置
     * @return 结果
     */
    @Override
    public int updateAssistPdfBaseConf(AssistPdfBaseConf assistPdfBaseConf)
    {
        assistPdfBaseConf.setUpdateTime(DateUtils.getNowDate());
        return assistPdfBaseConfMapper.updateAssistPdfBaseConf(assistPdfBaseConf);
    }

    /**
     * 批量删除PDF基本配置
     * 
     * @param ids 需要删除的PDF基本配置主键
     * @return 结果
     */
    @Override
    public int deleteAssistPdfBaseConfByIds(Long[] ids)
    {
        return assistPdfBaseConfMapper.deleteAssistPdfBaseConfByIds(ids);
    }

    /**
     * 删除PDF基本配置信息
     * 
     * @param id PDF基本配置主键
     * @return 结果
     */
    @Override
    public int deleteAssistPdfBaseConfById(Long id)
    {
        return assistPdfBaseConfMapper.deleteAssistPdfBaseConfById(id);
    }
}
